package com.example.finalwork2.handler;

import com.example.finalwork2.entity.VehicleSignal;

public abstract class AbstractSignalHandler implements SignalHandler {
    protected SignalHandler next;

    @Override
    public void setNext(SignalHandler next) {
        this.next = next;
    }

    protected void handleNext(VehicleSignal data) {
        if (next != null) next.handle(data);
    }
}
